#include "Progress.h"

void Progress()//函数定义
{
    char style[S_NUM]={'.','>','#','-','+'};
    char s[M];
    memset(s,'\0',sizeof(char)*M);
    char o[4]={'|','/','-','\\'};
    int cnt=0;
    while(cnt<=100)
    {
        printf("[%-100s][%d%%][%c]\r",s,cnt,o[cnt%4]);
        fflush(stdout);
        s[cnt++]=style[N]; 
        usleep(50000);//5s/100==0.05s==50000us
    }        
    printf("\n");
}
